<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	renderKitId="AJAX" xmlns:epm="http://www.bp.com.cn/epm">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script>
			//<![CDATA[
			function showRelation(title,url){
				iframe_rd.location.href=url;
				window_rd.setTitle(title);
				window_rd.show();
			}
			function closeWindow(jsvar){
				window_rd.hide();
				refreshData(jsvar);
			}
			
			function check(){
    			var r = historySchGridJsvar.getSelectionModel().getSelected();
    			if(r == null){
    				alert('请选择一条记录!');
    				return false;
    			}
    			return showConfirm('确认删除吗?');
    		}
    		
    		function addNew(){
    			addCenterLayoutTab('createNewSch','添加新版本','#{facesContext.externalContext.requestContextPath}/modules/eop/addNewVerSch.faces?id=#{eop_showSchnarioBean.id}', true);
    			closeCenterLayoutTab('showSchnarioTab');
    		}
		    //]]>
		</script>
	</w:head>
	<w:page title="查看预案">
		<layout:borderLayout fitToBody="true">
			<layout:panel region="center" fit="true" split="true" border="false" styleClass="k4-combineform"
				autoScroll="true">
				<w:form>
					<w:toolBar>
						<w:button label="添加新版本" id="add" onclick="addNew()"
							image="#{facesContext.externalContext.requestContextPath}/images/create.gif" />
						<w:separator />
						<w:button label="取消"
							image="#{facesContext.externalContext.requestContextPath}/images/cancel.gif"
							onclick="javascript:closeCenterLayoutTab('showSchnarioTab')" alwaysSubmit="false" />
					</w:toolBar>
					<layout:panelGrid columns="4" cellpadding="0" cellspacing="0" border="1"
						styleClass="k4-combineform-grid">
						<layout:cell styleClass="k4-form-fieldtitle" style="height: 0px;">
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue" style="height: 0px;">
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle" style="height: 0px;">
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue" style="height: 0px;">
						</layout:cell>

						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="预案编码"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="srCode"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="预案名称"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="srName"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="预案类型"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue" colspan="3">
							<h:outputText id="srType" converter="commonKeyFormatter"></h:outputText>
						</layout:cell>

						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="适用范围大类"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="srRangeBigType" converter="commonKeyFormatter"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="适用范围细类"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="srRangeThinType" converter="commonKeyFormatter"></h:outputText>
						</layout:cell>

						<!--<layout:cell styleClass="k4-form-fieldtitle">
						<h:outputLabel value="关键字"></h:outputLabel>
					</layout:cell>
					<layout:cell styleClass="k4-form-fieldvalue" colspan="5">
						<h:outputText id="srKeyWord"></h:outputText>
					</layout:cell>

					-->
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="创建者"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="createUser" converter="usernameFormatter"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="创建时间"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="createDate" converter="dateMinuteFormatter"></h:outputText>
						</layout:cell>

						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="版本号"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="version"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="系统版本号"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="srVersion"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="发布单位"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="publishDep"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="发布时间"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue">
							<h:outputText id="publishDate" converter="dateMinuteFormatter"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="摘要"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue" colspan="3">
							<h:outputText id="model" escape="false"></h:outputText>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldtitle">
							<h:outputLabel value="备注"></h:outputLabel>
						</layout:cell>
						<layout:cell styleClass="k4-form-fieldvalue" colspan="3">
							<h:outputText id="remark" escape="false"></h:outputText>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<layout:panel region="south" split="true" fit="true" height="200" border="false">
				<layout:tabLayout border="false" jsvar="dtabJsvar">
					<layout:panel title="历史版本">
						<w:form>
							<w:toolBar>
								<!--<w:button value="删除选中" id="deleteHistorySch" onclick="return check();"
									image="#{facesContext.externalContext.requestContextPath}/images/delete.gif" />
							--></w:toolBar>
							<w:dataGrid id="historySchGrid" height="auto" showRowNumber="true" toolBarPosition="bottom"
								autoHeight="true" paged="true" rows="15" border="false" jsvar="historySchGridJsvar">
								<w:outputColumn id="id" header="id" hidden="true"></w:outputColumn>
								<w:outputColumn id="srCode" header="编码" width="80"></w:outputColumn>
								<w:outputColumn id="srName" header="预案名称" width="122"></w:outputColumn>
								<w:outputColumn id="srType" header="类型" width="80" converter="commonKeyFormatter"></w:outputColumn>
								<w:outputColumn id="srRangeBigType" header="适用范围大类" width="100"
									converter="commonKeyFormatter"></w:outputColumn>
								<w:outputColumn id="srRangeThinType" header="适用范围细类" width="100"
									converter="commonKeyFormatter"></w:outputColumn>
								<w:outputColumn id="createUser" header="创建者" width="80" converter="usernameFormatter"></w:outputColumn>
								<w:outputColumn id="createDate" header="创建时间" width="110" converter="dateMinuteFormatter"></w:outputColumn>
								<w:outputColumn id="srVersion" header="版本" width="80"></w:outputColumn>
								<w:pagingToolbar for="historySchGrid" displayInfo="true" displayMsg="显示 {0} - {1}，共 {2} 条" />
							</w:dataGrid>
						</w:form>
					</layout:panel>
				</layout:tabLayout>
			</layout:panel>
		</layout:borderLayout>
		<layout:window jsvar="window_rd" show="false" width="750" height="450">
			<w:iframe id="iframe_rd" name="iframe_rd" style="width:100%;height:99%;"></w:iframe>
		</layout:window>
	</w:page>
</f:view>